<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>H+移动工作平台 - 运营报表</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <link rel="stylesheet" href="../css/styles.css">
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
  <div class="device-container">
    <!-- 状态栏 -->
    <div class="status-bar">
      <div class="status-bar-left">
        <span class="time">9:41</span>
      </div>
      <div class="status-bar-right">
        <i class="fas fa-signal signal"></i>
        <i class="fas fa-wifi wifi"></i>
        <i class="fas fa-battery-full battery"></i>
      </div>
    </div>

    <!-- 导航栏 -->
    <div class="nav-bar">
      <div class="nav-left">
        <a href="home.html"><i class="fas fa-arrow-left"></i></a>
      </div>
      <div class="nav-title">运营报表</div>
      <div class="nav-right">
        <i class="fas fa-share-alt"></i>
      </div>
    </div>

    <!-- 应用内容 -->
    <div class="app-content">
      <!-- 日期选择 -->
      <div class="flex justify-between items-center p-4">
        <div class="flex items-center">
          <span class="text-gray-600 mr-2">数据周期</span>
          <div class="relative">
            <select class="bg-gray-100 border-0 rounded-lg py-1 pl-3 pr-8 text-sm appearance-none">
              <option>本月</option>
              <option>上月</option>
              <option>本季度</option>
              <option>本年度</option>
              <option>自定义</option>
            </select>
            <div class="absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none">
              <i class="fas fa-chevron-down text-gray-400 text-xs"></i>
            </div>
          </div>
        </div>
        <div class="text-sm text-gray-500">
          更新时间: 2024-03-16 08:30
        </div>
      </div>

      <!-- 核心指标 -->
      <div class="grid grid-cols-2 gap-3 px-4 mb-4">
        <div class="bg-white rounded-lg p-3 shadow-sm">
          <div class="text-xs text-gray-500 mb-1">门诊量</div>
          <div class="flex items-end">
            <span class="text-xl font-bold">2,568</span>
            <span class="text-xs text-green-500 ml-2">+5.2%</span>
          </div>
          <div class="text-xs text-gray-400 mt-1">较上月</div>
        </div>
        <div class="bg-white rounded-lg p-3 shadow-sm">
          <div class="text-xs text-gray-500 mb-1">住院量</div>
          <div class="flex items-end">
            <span class="text-xl font-bold">486</span>
            <span class="text-xs text-green-500 ml-2">+3.8%</span>
          </div>
          <div class="text-xs text-gray-400 mt-1">较上月</div>
        </div>
        <div class="bg-white rounded-lg p-3 shadow-sm">
          <div class="text-xs text-gray-500 mb-1">手术量</div>
          <div class="flex items-end">
            <span class="text-xl font-bold">312</span>
            <span class="text-xs text-red-500 ml-2">-1.2%</span>
          </div>
          <div class="text-xs text-gray-400 mt-1">较上月</div>
        </div>
        <div class="bg-white rounded-lg p-3 shadow-sm">
          <div class="text-xs text-gray-500 mb-1">床位使用率</div>
          <div class="flex items-end">
            <span class="text-xl font-bold">85.7%</span>
            <span class="text-xs text-green-500 ml-2">+2.1%</span>
          </div>
          <div class="text-xs text-gray-400 mt-1">较上月</div>
        </div>
      </div>

      <!-- 门诊量趋势 -->
      <div class="card mx-4 mb-4">
        <div class="card-header">
          <span>门诊量趋势</span>
          <div class="flex">
            <div class="text-xs px-2 py-1 bg-blue-100 text-blue-500 rounded-full mr-1">日</div>
            <div class="text-xs px-2 py-1 bg-gray-100 text-gray-500 rounded-full mr-1">周</div>
            <div class="text-xs px-2 py-1 bg-gray-100 text-gray-500 rounded-full">月</div>
          </div>
        </div>
        <div class="card-body">
          <canvas id="outpatientChart" height="200"></canvas>
        </div>
      </div>

      <!-- 科室收入分布 -->
      <div class="card mx-4 mb-4">
        <div class="card-header">
          <span>科室收入分布</span>
          <div class="text-xs text-blue-500">查看详情</div>
        </div>
        <div class="card-body">
          <canvas id="departmentChart" height="200"></canvas>
        </div>
      </div>

      <!-- 医疗收入构成 -->
      <div class="card mx-4 mb-4">
        <div class="card-header">
          <span>医疗收入构成</span>
          <div class="text-xs text-blue-500">查看详情</div>
        </div>
        <div class="card-body">
          <canvas id="incomeChart" height="200"></canvas>
        </div>
      </div>

      <!-- 物资消耗TOP5 -->
      <div class="card mx-4 mb-4">
        <div class="card-header">
          <span>物资消耗TOP5</span>
          <div class="text-xs text-blue-500">查看全部</div>
        </div>
        <div class="card-body p-0">
          <div class="list-item">
            <div class="flex items-center">
              <div class="w-6 h-6 rounded-full bg-red-500 flex items-center justify-center text-white text-xs mr-3">1</div>
              <span>一次性医用口罩</span>
            </div>
            <div class="text-right">
              <div class="font-medium">¥28,560</div>
              <div class="text-xs text-gray-500">12,500盒</div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <div class="w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center text-white text-xs mr-3">2</div>
              <span>医用手套</span>
            </div>
            <div class="text-right">
              <div class="font-medium">¥22,350</div>
              <div class="text-xs text-gray-500">9,800盒</div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <div class="w-6 h-6 rounded-full bg-yellow-500 flex items-center justify-center text-white text-xs mr-3">3</div>
              <span>一次性注射器</span>
            </div>
            <div class="text-right">
              <div class="font-medium">¥18,720</div>
              <div class="text-xs text-gray-500">15,600支</div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <div class="w-6 h-6 rounded-full bg-gray-300 flex items-center justify-center text-white text-xs mr-3">4</div>
              <span>医用酒精</span>
            </div>
            <div class="text-right">
              <div class="font-medium">¥15,480</div>
              <div class="text-xs text-gray-500">1,290瓶</div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <div class="w-6 h-6 rounded-full bg-gray-300 flex items-center justify-center text-white text-xs mr-3">5</div>
              <span>输液器</span>
            </div>
            <div class="text-right">
              <div class="font-medium">¥12,960</div>
              <div class="text-xs text-gray-500">8,640套</div>
            </div>
          </div>
        </div>
      </div>

      <!-- 运营指标 -->
      <div class="card mx-4 mb-4">
        <div class="card-header">
          <span>运营指标</span>
        </div>
        <div class="card-body p-0">
          <div class="list-item">
            <div class="flex items-center">
              <i class="fas fa-user-md text-blue-500 mr-3"></i>
              <span>医师工作量</span>
            </div>
            <div class="flex items-center">
              <span class="text-sm mr-2">8.6分</span>
              <div class="w-16 h-2 bg-gray-200 rounded-full overflow-hidden">
                <div class="h-full bg-blue-500 rounded-full" style="width: 86%"></div>
              </div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <i class="fas fa-procedures text-green-500 mr-3"></i>
              <span>平均住院日</span>
            </div>
            <div class="flex items-center">
              <span class="text-sm mr-2">9.2天</span>
              <div class="w-16 h-2 bg-gray-200 rounded-full overflow-hidden">
                <div class="h-full bg-green-500 rounded-full" style="width: 78%"></div>
              </div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <i class="fas fa-hospital text-purple-500 mr-3"></i>
              <span>床位周转率</span>
            </div>
            <div class="flex items-center">
              <span class="text-sm mr-2">3.2次</span>
              <div class="w-16 h-2 bg-gray-200 rounded-full overflow-hidden">
                <div class="h-full bg-purple-500 rounded-full" style="width: 64%"></div>
              </div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <i class="fas fa-syringe text-red-500 mr-3"></i>
              <span>手术成功率</span>
            </div>
            <div class="flex items-center">
              <span class="text-sm mr-2">98.5%</span>
              <div class="w-16 h-2 bg-gray-200 rounded-full overflow-hidden">
                <div class="h-full bg-red-500 rounded-full" style="width: 98.5%"></div>
              </div>
            </div>
          </div>
          <div class="list-item">
            <div class="flex items-center">
              <i class="fas fa-smile text-yellow-500 mr-3"></i>
              <span>患者满意度</span>
            </div>
            <div class="flex items-center">
              <span class="text-sm mr-2">92.8%</span>
              <div class="w-16 h-2 bg-gray-200 rounded-full overflow-hidden">
                <div class="h-full bg-yellow-500 rounded-full" style="width: 92.8%"></div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 报表下载 -->
      <div class="flex justify-center mb-4">
        <button class="btn btn-outline flex items-center">
          <i class="fas fa-download mr-2"></i>
          <span>下载完整报表</span>
        </button>
      </div>
    </div>

    <!-- 底部标签栏 -->
    <div class="tab-bar">
      <a href="home.html" class="tab-item active">
        <i class="fas fa-home tab-icon"></i>
        <span>首页</span>
      </a>
      <a href="asset.html" class="tab-item">
        <i class="fas fa-laptop tab-icon"></i>
        <span>资产</span>
      </a>
      <a href="finance.html" class="tab-item">
        <i class="fas fa-wallet tab-icon"></i>
        <span>财务</span>
      </a>
      <a href="material.html" class="tab-item">
        <i class="fas fa-box tab-icon"></i>
        <span>物资</span>
      </a>
      <a href="profile.html" class="tab-item">
        <i class="fas fa-user tab-icon"></i>
        <span>我的</span>
      </a>
    </div>
  </div>

  <script>
    // 门诊量趋势图
    const outpatientCtx = document.getElementById('outpatientChart').getContext('2d');
    const outpatientChart = new Chart(outpatientCtx, {
      type: 'line',
      data: {
        labels: ['3/10', '3/11', '3/12', '3/13', '3/14', '3/15', '3/16'],
        datasets: [{
          label: '门诊量',
          data: [85, 92, 78, 89, 95, 86, 90],
          backgroundColor: 'rgba(59, 130, 246, 0.1)',
          borderColor: 'rgba(59, 130, 246, 1)',
          borderWidth: 2,
          tension: 0.4,
          fill: true
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            display: false
          }
        },
        scales: {
          y: {
            beginAtZero: false,
            grid: {
              display: true,
              color: 'rgba(0, 0, 0, 0.05)'
            }
          },
          x: {
            grid: {
              display: false
            }
          }
        }
      }
    });

    // 科室收入分布图
    const departmentCtx = document.getElementById('departmentChart').getContext('2d');
    const departmentChart = new Chart(departmentCtx, {
      type: 'doughnut',
      data: {
        labels: ['内科', '外科', '妇产科', '儿科', '急诊科', '其他'],
        datasets: [{
          data: [30, 25, 15, 12, 10, 8],
          backgroundColor: [
            'rgba(59, 130, 246, 0.8)',
            'rgba(16, 185, 129, 0.8)',
            'rgba(249, 115, 22, 0.8)',
            'rgba(236, 72, 153, 0.8)',
            'rgba(139, 92, 246, 0.8)',
            'rgba(107, 114, 128, 0.8)'
          ],
          borderWidth: 0
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'right',
            labels: {
              boxWidth: 12,
              padding: 10,
              font: {
                size: 10
              }
            }
          }
        },
        cutout: '65%'
      }
    });

    // 医疗收入构成图
    const incomeCtx = document.getElementById('incomeChart').getContext('2d');
    const incomeChart = new Chart(incomeCtx, {
      type: 'bar',
      data: {
        labels: ['门诊收入', '住院收入', '药品收入', '检查收入', '手术收入', '其他收入'],
        datasets: [{
          label: '收入（万元）',
          data: [320, 280, 210, 180, 150, 90],
          backgroundColor: [
            'rgba(59, 130, 246, 0.8)',
            'rgba(16, 185, 129, 0.8)',
            'rgba(249, 115, 22, 0.8)',
            'rgba(236, 72, 153, 0.8)',
            'rgba(139, 92, 246, 0.8)',
            'rgba(107, 114, 128, 0.8)'
          ],
          borderWidth: 0,
          borderRadius: 4
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            display: false
          }
        },
        scales: {
          y: {
            beginAtZero: true,
            grid: {
              display: true,
              color: 'rgba(0, 0, 0, 0.05)'
            }
          },
          x: {
            grid: {
              display: false
            }
          }
        }
      }
    });
  </script>
</body>
</html> 